<html>

	<head>
		<title>物流详情</title>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">

		<link href="../../css/skin/default/style.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" href="../../css/dialog.css">
		<link href="../../js/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />

		<script src="../../js/lib/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>

		<script src="../../js/lib/ligerUI/js/plugins/ligerPopupEdit.js"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerRadio.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerTip.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerMenu.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerToolBar.js" type="text/javascript"></script>
		<script src="../../js/lib/jquery.form.js" type="text/javascript"></script>
		<script src="../../js/lib/json2.js" type="text/javascript"></script>
		<script src="../../js/dialog.js"></script>
		<script src="../../js/JS/layout.js"></script>
		<script src="../../js/constants.js" type="text/javascript"></script>
		<script src="../../js/api.js" type="text/javascript"></script>

		<script type="text/javascript">
			var manager;
			var Fcode = $api.getparastr("Fcode");
			$(function() {
				$("form").ligerForm();
				initGrid();
			});

			function initGrid() {
				var url = BaseUrl + "SaleDelivery?token=" + $api.getStorage("token") + "&Fcode=" + Fcode;

				manager = $("#maingrid4").ligerGrid({
					columns: [{
							display: '标题',
							name: 'PDesc',
							align: 'left',
							minwidth: 380,
							render: function(rowdata, rowindex, value) {
								if(rowdata.Head) {
									var head = rowdata.Head; 
									return"【 "+ head.Express+"】单号: <span style = 'color:#666;font-weight:300' >"+head.Fcode+" </span>";

								}

								var Fattr = "";
								var arr;
								if(rowdata.Detail.Fattr) {
									arr = JSON.parse(rowdata.Detail.Fattr);
								}
								for(var i in arr) {
									var row = arr[i];
									Fattr += row.Fattr + ":" + row.Fvalue + "；";
								}
								var ret = "<img src=" + rowdata.Detail.Fimg + " class='listimgs' style='float:left;top:5px' />";
								ret += "<div style='float:left; margin-left:5px'><span>" + rowdata.Detail.Fsummary + "</span>";
								ret += "<br/><span style='color:#999'>" + Fattr + "</span>"

								ret += "</div>"
								return ret;
							}
						},
						{
							display: '发货数量',
							name: 'Fnum',
							align: 'left',
							width: 200,
							render: function(rowdata, rowindex, value) {
								if(!rowdata.Head) {
									return rowdata.Detail.Fnum;
								}
								return "";
							}
						},

						{
							display: '发货时间',
							name: 'Fdate',
							type: 'text',
							width: 300,
							align: 'left',
							render: function(rowdata, rowindex, value) {
								if(rowdata.Head) {
									var head = rowdata.Head;
									head.Fsenddate = head.Fsenddate.replace("T", " ");
									var i = head.Fsenddate.indexOf('.');
									head.Fsenddate = head.Fsenddate.substr(0, i);
									return head.Fsenddate;
								}
								return "";
							}

						}

					],
					method:'get',
					url: url,
					width: '99.5%',
					isScroll: true,
					rowHeight: "auto",
					rowAttrRender: function(rowdata, rowid) {
						if(rowdata.Head) {
							return "style='background:#f3f3f3;'";
						}
					},
					height: '85%'

				});
			}
		</script>

	</head>

	<body class="mainbody">
		<form id="form1" onsubmit="return false">
			<!--导航栏-->
			<div class="location" width="300px">
				<table>
					<tr>
						<td>
							<!--<a href="javascript:history.back(-1)" class="back"><i></i><span>返回</span></a>-->
						</td>
						<td>
							<span style="margin-left:10px">交易管理</span>
							<i class="arrow"></i>
							<span class="nows">物流详情</span> </td>
					</tr>
				</table>
			</div>

			<div class="line10"></div>

			<!--订单详情-->
			<div id="maingrid4" style="margin: 0px;background:#fff;"></div>
			</div>
		</form>

	</body>

</html>